#include<iostream>
class Solution {
public:
    int Add(int num1, int num2) {
        int tmp = num1;
        while (num2)
        {
            tmp = num1 ^ num2;
            num2 = (num1 & num2) << 1;
            num1 = tmp;
        }
        return tmp;
    }
};
int main()
{
    std::cout << Solution().Add(-10, 1000) << std::endl;
    return 0;
}